package org.example.entity;

import java.util.Date;

public class Content {
    // 基础字段
    private String id;
    private String title;
    private String type;  // movie/book/music
    private String coverImage;
    private String genre;
    private String description;
    private String language;
    private String country;
    private String status; // pending/published/archived
    private String thumbnailUrl;
    private Date createdAt;
    private Date updatedAt;
    private String coverUrl;
    private String category;
    private String imageUrl;
    private boolean isHot;


    // 电影特有字段
    private String director;
    private String actors;
    private Date releaseDate;
    private int duration; // 分钟

    // 图书特有字段
    private String author;
    private String publisher;
    private Date publishDate;
    private int pages;

    // 音乐特有字段
    private String artist;
    private String album;
    private int releaseYear;
    private int tracks;

    public static final String TYPE_MOVIE = "movie";
    public static final String TYPE_BOOK = "book";
    public static final String TYPE_MUSIC = "music";
    // 无参构造器
    public Content() {
    }

    // 全参构造器
    public Content(int id, String title, String type, String coverImage,
                   String genre, String description, String language,
                   String country, String status) {
        this.id = String.valueOf(id);
        this.title = title;
        this.type = type;
        this.coverImage = coverImage;
        this.genre = genre;
        this.description = description;
        this.language = language;
        this.country = country;
        this.status = status;
    }
    public Content(String title, String type, String description) {
        this(); // 调用无参构造器初始化默认值
        this.title = title;
        this.type = type;
        this.description = description;
    }
    // 所有Getter和Setter方法
    public String getId() {
        return id;
    }

    public void setId(String id) {  // 从int改为String
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getCoverImage() {
        return coverImage;
    }

    public void setCoverImage(String coverImage) {
        this.coverImage = coverImage;
    }

    public String getGenre() {
        return genre;
    }

    public void setGenre(String genre) {
        this.genre = genre;
    }
    public String getThumbnailUrl() {
        return thumbnailUrl;
    }
    public void setThumbnailUrl(String thumbnailUrl) {
        this.thumbnailUrl = thumbnailUrl;
    }
    public String getCategory() {
        return category;
    }
    public void setCategory(String category) {
        this.category = category;
    }
    public String getImageUrl() {
        return imageUrl;
    }
    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }
    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getLanguage() {
        return language;
    }

    public void setLanguage(String language) {
        this.language = language;
    }

    public String getCountry() {
        return country;
    }

    public void setCountry(String country) {
        this.country = country;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    public Date getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(Date updatedAt) {
        this.updatedAt = updatedAt;
    }
    public void setHot(boolean isHot) {
        this.isHot = isHot;
    }

    public void setsHot(boolean isHot) {
        this.isHot = isHot;
    }

    // 电影字段的Getter/Setter
    public String getDirector() {
        return director;
    }

    public void setDirector(String director) {
        this.director = director;
    }

    public String getActors() {
        return actors;
    }

    public void setActors(String actors) {
        this.actors = actors;
    }

    public Date getReleaseDate() {
        return releaseDate;
    }

    public void setReleaseDate(Date releaseDate) {
        this.releaseDate = releaseDate;
    }

    public int getDuration() {
        return duration;
    }

    public void setDuration(int duration) {
        this.duration = duration;
    }

    // 图书字段的Getter/Setter
    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getPublisher() {
        return publisher;
    }

    public void setPublisher(String publisher) {
        this.publisher = publisher;
    }

    public Date getPublishDate() {
        return publishDate;
    }

    public void setPublishDate(Date publishDate) {
        this.publishDate = publishDate;
    }

    public int getPages() {
        return pages;
    }

    public void setPages(int pages) {
        this.pages = pages;
    }

    // 音乐字段的Getter/Setter
    public String getArtist() {
        return artist;
    }

    public void setArtist(String artist) {
        this.artist = artist;
    }

    public String getAlbum() {
        return album;
    }

    public void setAlbum(String album) {
        this.album = album;
    }

    public int getReleaseYear() {
        return releaseYear;
    }

    public void setReleaseYear(int releaseYear) {
        this.releaseYear = releaseYear;
    }

    public int getTracks() {
        return tracks;
    }

    public void setTracks(int tracks) {
        this.tracks = tracks;
    }
    public String getCoverUrl() {
        return coverUrl;
    }

    public void setCoverUrl(String coverUrl) {
        this.coverUrl = coverUrl;
    }

    // toString方法（可选）
    @Override
    public String toString() {
        return "Content{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", type='" + type + '\'' +
                ", status='" + status + '\'' +
                '}';
    }
}